import Vue from 'vue'
import Router from 'vue-router'
import person from './person'

Vue.use(Router)

export default new Router({
  mode: 'hash',
  routes: [
    {
      path: '/',
      name: 'Index',
      component: resolve => require(['@/components/Index'], resolve)
    },
    {
      path: '/person',
      name: 'person-index',
      component: resolve => require(['@/components/person/Index'], resolve),
      children: person
    },
    {
      path: '/login',
      name: 'login',
      component: resolve => require(['@/components/Login'], resolve)
    },
    {
      path: '/register',
      name: 'register',
      component: resolve => require(['@/components/Register'], resolve)
    },
    {
      path: '/test',
      name: 'test',
      component: resolve => require(['@/components/test'], resolve)
    },
    {
      path: '/forget',
      name: 'forget',
      component: resolve => require(['@/components/Forget'], resolve)
    },
    {
      path: '*',
      name: 'error',
      component: resolve => require(['@/components/info/error'], resolve)
    }
  ]
})
